package com.example.myapplication.flutter

import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import io.flutter.view.FlutterView
import android.widget.FrameLayout


class Flutterview1117 : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
//        val flutterView: FlutterView = Flutter.createView(this, lifecycle, "initialRoute")
//        setContentView(flutterView)

        // 通过FlutterView引入Flutter编写的页面
//     var    flutterView =  FlutterView(this);
//        FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(
//            ViewGroup.LayoutParams.MATCH_PARENT,
//            ViewGroup.LayoutParams.MATCH_PARENT);
//        FrameLayout flContainer = findViewById(R.id.fl_container);
//        flContainer.addView(flutterView, lp);

    }

    fun onLoadFlutter(view: View?) {
//        val flutterView: View = Flutter.createView(this, lifecycle, "route1")
//        val layoutParams = FrameLayout.LayoutParams(600, 600)
//        layoutParams.topMargin = 100
//        addContentView(flutterView, layoutParams)
    }
}